import http from '@/utils/request'
const URL = '/breed/businessBreeding';
// 获取列表数据
export function getAllInfoByPage(pageNum = 1, pageSize = 10) {
  return http({
      url:`${URL}/list/${pageNum}/${pageSize}`,
      method: 'get',

  })
}

// 展示修改前的内容
export function showEidtRequest(id){
  return http({
      url:`${URL}/get/${id}`,
      method: 'get',
  })
}

// 修改数据
export function EidtRequest(id,data){
  return http({
      url:`${URL}/update/${id}`,
      method: 'post',
      data: data
  })
}


//通过id删除订单
export function deleteOrder(id) {
  return http({
  url: `${URL}/delete/${id}`,
  method:'delete'
})
}

//新增商家
export function AddOrder(data) {
  return http({
      url:`${URL}/save`,
      method: 'post',
      data
  })
}

//通过商家类型查询数据
export function getInfoByBatch(data) {
  return http({
      url: `${URL}/listByType/${data.pageNum}/${data.pageSize}?type=${data.type}`,
      method:'get'
  })
}
